package com.fs;

import java.util.Scanner;

public class score {
    public static void main(String[] args) {

        Scanner user=new Scanner(System.in);
        System.out.println("请输入有多少个评委评分");
        int n=user.nextInt();

        ret(n);
    }

    public static void ret(int n)
    {
        Scanner user=new Scanner(System.in);

        double[] arr=new double[n];
        double mini=arr[0],max=arr[0],averagescore=0;

        for(int i=0;i<n;i++)
        {
            System.out.println("请输入评委的打分：");
            double score=user.nextDouble();
            arr[i]=score;
            averagescore+=arr[i];

            mini=mini>arr[i]?arr[i]:mini;

            max=max<arr[i]?arr[i]:max;
        }
        averagescore=averagescore/(n*1.0);
        System.out.println("该选手的平均分为："+averagescore+"分");
        System.out.println("该选手的最高分为："+max+"分");
        System.out.println("该选手的最低分为："+mini+"分");

    }
}
